package com.iting.test.controller;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

/**
 * @author iting Nie
 * @version 1.1
 * @create 2022/2/11
 */
@Component("/controllerinterface")
public class ControllerInterfaceController implements Controller {
	public ControllerInterfaceController() {
		System.out.println("ControllerInterfaceController");
	}

	@Override
	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
		// ModelAndView modelAndView = new ModelAndView();
		// modelAndView.setViewName("/hello");
		// return modelAndView;
		PrintWriter writer = response.getWriter();
		writer.print("Controller");
		return null;
	}
}
